package org.dzq.designmode.bridge;

/**
 * @ClassName: Test
 * @Package: org.dzq.designmode.bridge
 * @author: 越
 * @date: 2023/6/17 15:49
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        Shape square = new Square();
        square.setColor(new Green());
        square.draw();
        square.setColor(new Red());
        square.draw();


        Shape rectangle = new Rectangle();
        rectangle.setColor(new Green());
        rectangle.draw();
        rectangle.setColor(new Red());
        rectangle.draw();
    }
}
